refactored inverse rl