cleaned up working repeater code