Changed pin number and simplified functionality