made saving more oo, removed switch statements