Working with random processes