refactoring
improved test
improved documentation