Adapted to use base-java8