Added a method to toggle pin by pin