implemented sub_to, sub_from, and remove_index, still needs more functions