This logic should go to a factory. Hardcoding it here makes the class much less flexible