inverting function

inverting function