generalized getMoves