added connect method to model and exception module