Quantized anomalous Hall effect in magnetic topological insulators