Made string processing its own function