updated check for function variables to give error if they are the same name as their function