merging and fixes