trimmed ios code out