moved from NJ1, refactored