made RotaryEncoder static
refactored access to volatile step field