My homework from loops