Functionality from this code has been integrated with sub_string.py, it can/should be removed