optimized step 2