address @rdowner's code review comments