fix using #each_with_object everywhere instead #each.with_object