add delete function to delete by Id and by status