made the timeout configurable