updates to be compatible with Java 7