edits from Andres' code review