created repository factory
changes RegisterExpensecontroller to use the repository factory