improvements

some small speed improvements