made random allocatio method actually allocate randomly