many changes, too lazy to split them up right now