Finished Boyer-Moore imperative part