updated documentation according to code review