reduced code size from 60K to 49K, Ram from 2.2K to 1.2K