cleaned up connection module