speed improvements
bugfix