wrote a db connection class