Updated as per code review