added pin toggle utility