update Select algorithm