refactor #each item mutable data pattern