added impure randomNess, for testing purposes