Modify function generating