more python'y way of doing things