this should migrate to std.range