did things the pythonic way