timeout handling, refactoring