added method documentation
Final refactoring