a few improvements found during PR review