refactored inline doc out to improve readability