changes as per code review comments