Stochastic approximation with two time scales