Optimizing

ready to be merged