Added new function to subscript at the detail level.
Adjust the control flow to use the input selector for detail level.