streamlined simulation function
minor script changes
added multiple permutation