changed addFunctions variable to haveFunctionhs