code to make a move & pass first few tests