speed improvements
still trying to find issue