implemented latchPin