refactor rrule