add different implementation of KMP