refactored arduino code