compatibility with java 6