refactoring part 1
added documentation