wrote get avalible moves and added a helper function