implemented subset, fixed randomizedqueue