change to java 1.8 and add sample lambda code (java 8 feature)