fix old merging and code