made script more powerful
updated to DR4