updated custom query

update custom query function - cquery