changes required to compile with jdk7