add parameters to connect method