Some kind of 2 input gate logic maybe?