adding docstrings
changing second loop in _get_output to actually account for the prompt_expected parameter
adding parameter wait to _get_output to change the time spent waiting in each loop