add support for function-based configuration