This is a lot of work but oddly satisfying