added inverse option