Update commonFunctions.js