lots of little changes and premature optimizatons