now with loops