changed Teoria to be a factory