refactored arnn