Update sources to work with functions