working on repo fn