updated the code with review comments, Dev Task : CSH-1522