test script for running third + second order opt