make it work in java 6