accept a function as the default value