made timeout configurable