add add_functions for model