remove movelist and refactor first-move function