moving logic