refactoring
added documentation
refactoring