list comprehension, plus other fixups