source can now be a function