change to java8; refractor async