replaced java 8 code with guava methods
replaced java 8 code with guava methods