simplifying code with drupal helper methods