added java 6 support