make timeout optional when constructing the object