Modified to follow drupal conventions