remove element in place