Added documentation for the customStackOrder function