reorganized repo class. ensured that the code works