modify and add Java Doc