clean up lqr test function