started to integrate db queries