added makeValidMove