Feature/7 update db queries

Fixes #7