updated ridge regression func