started getting db queries working