made some minor changes
sped up a little