updated to for loop again