Fixing error that is not adding the function