inversion works for encoders