fixing bugs in rep new