addfunction