adds reduced SAM code