basic interval implementation

see issue #126