performance tune, about 10 times faster now