function for adding random drop
generating SWE sample
minor changes, mainly comments added