handle interruptedexception better