simple refactored and documentation update