writing is unroll_safe as well