Update genericFunctions.js