timing improvements
minor optimization