lots of changes made
overall speed improvements