add randomzed select. todo add comments