changes as per PR comments