be more explicit about type of repeat_context