updated to stop using java 6.