FFS this is a lot of work.