refactor to play nice with Arduino IDE