fixed a bunch of stuff, also using the dao from jiang