added safe remove