updated pins

cleaned up the code