adds logic to prevent illegal moves
adds more controller tests