add KMP algorithm, seems that prog. works :)