implements Interval coercion

with some help from Brett for polishing the tests