nit: can define this on one line: `Map result = { "refs": refs };`