changes to match arduino code