rework rep, add test