sketch modified for servo library use