What obstacle did Thomas Edison have to overcome before he could perfect his invention?