better modularized code, easier to understand