for loop doesnt work