implemented method query