Added timeout argument in constructor