fix connection function create