modified to work with standard Arduino IDE