prepared for java version 6