Changed variables logic. Added example.
fixed script version in example