updated output for KMP