Ability to plugin a custom function to query