refactored + added reverse lookup