check in KMP algorithm