public static function removeValue(
    $subject, $property, $value, $options=array()) {
    self::setdefaults($options, array(
      'propertyIsArray' => false));

    // filter out value
    $filter = function($e) use ($value) {
      return !self::compareValues($e, $value);
    };
    $values = self::getValues($subject, $property);
    $values = array_values(array_filter($values, $filter));

    if(count($values) === 0) {
      self::removeProperty($subject, $property);
    } else if(count($values) === 1 && !$options['propertyIsArray']) {
      $subject->{$property} = $values[0];
    } else {
      $subject->{$property} = $values;
    }
  }