made timeout option to work