scoped defining properties becaue when changing a model property the key variable was referring to the last attribute in the loop