Modified using Java SE 8