making code java 1.6 friendly