remove @mut pointer from Repository
and make other type's lifetime dependent on Repository