handle nested variations