added inverse stuff