slight speed improvements