refactoring osc_top_doc