add generic function for possible moves