Wrote while statement for moves checking
Clean up