moved cases out of constructor