Could create it outside of this closure? No idea whether it's worth optimising though.