Change code to use another method to calculate jump table and to match substring