stop it merethe
put make_command_stream stuff into a new function called make_command_tree