change the mean function to inverse and also the variable name and function name