add generate moves and apply moves