merging script by alex