updated helperFunctions