java 8 adapted