moved db connection and functions to the dbStore class