corrected logic to count moves. make use of options