Use arguments passed into connect method.

The method wasn't use the arguments passed in.