the engine light came on and the code reader said crank position sensor, changed on 2007 Pontiac Grand Prix

it and it still wont run right. starts hesitantly and stalls. this is a recent problem started after we changer thermostat and flushed heater core. any ideas?

Asked by for the 2007 Pontiac Grand Prix