TODO: make sure this is safely randomish