break the `Shell()` function into smaller more testable segments
break the
Shell()function into smaller more testable segments