this should've been v3, but it's not much of a rewrite