code review changes per #413