added note that source can be a function