fix the functions to work on Delong's test drupal site.