remove selected object function here