fixing remove bug
smaller code