And maybe this can be increased with a factory method for the first if statement