add timeout and max_retries options