Work I forgot to commit, can't remember what changed
starting a bit of a rewrite