add method to set a new pattern for compare.this is for some developer to want to get user saved pattern on the server