Fixed problems with translation; Completed method to compare patterns