using loop