Add querying repeating segment

Fixes #1