update runit to use addFunction