changes as mentioned in code review