1. redundant code is removed using function call