support re_restr. phew. this was hard