added db queries