- prepared context matching
- fixed some bugs
- added comments