added max_timeout and default_timeout