box movement check to check x or y