fixed repository factory