solve the remove element