more merging stuff from before, this reverts some of the previous commit