much of this is just copied over from my google doc (in particular the schemas) so it's not the clearest rn i will tidy up later