final commit before refactoring to use a queries class