Optimization working

but need to fix mesh warping