calculating combinations randomly