adjustments to arduino sketch