rework part 1
restructure part 2