migrated for java8