compatibility for java 7