modify slightly to clean compiled codes of functions