New function to manage repository