fixes to the ridge functions