added db query