added db qery listener