updated api for drupal7