framework for string sorting