changes per @arturadib's code review