added direct ridge function and test script