improved modularity of code