Spacing should be "switch ($type) {"