abstracted out db connection to php class