changed pin 2 interrupt to pin change interrupt
switched to interrupt based logical control