Refactor #58 java