done changes as per the comments made from the code review