update of prefix and suffix extraction and to sorted hash