rabin-karp fully finished