updates to make compatible with jdk 1.6