add callback when connected to db