now checks intervals, fixes #2