moved the pin initializations to the intialization function