added main theorem