moved toMove flag into state class