change style to use `to_h` instead of `reduce({})`