allow a custom function to be used for matching loaders