implement hebbian rule