refactor to use repeater