trimmed Arduino code