revert the cleaning of functions until we understand it better