added moveDiag function