updated standalone sample to only do optimization