working on improving querying and unit tests