adding a repository to decouple the persistence