modularizing the work