code rework part 2
code rework part 3