inverted more control
fixed some indentation and made my tests more unitly
got tests to be determinist