fixes bug where every pattent was assigned the same random number