more looping stuff and saving with popup editor