implemented the in memory repository