test for custom_query