Updated remove select function