changes as per suggested in PR comments