backward prop + update