Added the makeMove function