I would have prefered to solve the line length problem by writing a small helper function to remove the redundancy from these lines.