modified RotationCheck.java