refined valid movement check