compress nested statement