adds function with path