improving control flow of accept. set timeouts