Adding a function that does randomization... kind of