each with object instead of reduce because its slightly easier to use