compatibilty for Java 6