#123 added documentation
#102 refactoring