use function construction instead of decoration