changed to use java 8