modularize part 2
modularize part 3