added weight update equations