implementation of db connection establishment almost completed