Added ability to customize timeout time