fixed merging problems, just a copy of old owrk