java 6
refactoring