improved snippet output

added features:
- snippet output can be sorted
- start offset for the snippet output