added functions to find all possible next moves from a state