Second attempt

fixed the inverse issue I hope