more pythonic structure