make output object immutable