adding momentum term to speeding up training.