fixed some example for using db connection