added parameter to the connection constructor to pass a custom time limit