changes made according to code review guidelines.