refactored Java classes