updating for JAVA 7