improved loop
spacing