removed for-in usage for speed
getting around gc thrashing