added windowListener for interrupt