minor speed improvements
minor speed improvements