wrote moveBlock and most of blockLogic.