almost working...invert needs love