Implement a createSource function, as usual