Optimization: improves speed by 30%.