moving and optimizeing