fixed some heavy merge conflicts