Update method for rotation; TODO compare with Java version