this should also be in a factory class