changes made as per PR comments