added db query class