source: Add implement for KMP