linearize contexts