added code for calling db queries. but sqlite isn't working on Quarry