Made the tool to sort according to non alphabetic characters more generic