Made funtion to return all valid moves