adding and removing repositories from database works