weights are now correctly updated; cost is decreasing!