//used with rep map