swapped some gates and moved all parts around