merged branches, have yet to delete unneeded parts