Merged to previous scripts into one