refactored calls the digitalWrite

additional whitespace was also removed