add all the code imported from the other thing
fix a few things and add some notes