Use a more pythonic structure.