replace main script