add support for custom resolver function