optimized some lines