2001 Hyundai Elantra ck eng flashes/momentary power loss

My original ? was in Jan 2007 on the “old” forum…I want to update readers on the solution…Problem was: Ck eng light flashes with momentary loss of power and tachometer drops to 0, the goes right back up again. Sometimes stalled, but started right up…dealer could not find the problem after $1500 worth of parts and labor. A local garage replaced the CAM sensor for $35.00 and $10.00 labor. It has been fine since March 2007