loops in an easier way