data can be a function now