building out general text processing functions