add method to set the timeout