Whats the point of passing timeout as a pointer here?