java changes for part 2