Updated the functions exercises to pass the mocha tests