fix bug with KeyNotFoundException

- fix bug with character that is missing in the pattern, but exists in
sequence
- add more constants
- implement GoNext