reduce lines of code