adding of connect.c and connect.h