demonstrates very basic algorithm of sorting string by their match to the term