Magnetic extension as an efficient method for realizing the quantum anomalous hall state in topological insulators