made changes as per code review feedback