adding listeners to changing pin event