simplifying steps by introducing helper functions and scripts