move interval into an attribute