probably more pythonic. result should be the same