applying for loop to property