added repository factory