changes as per feedback in code review.