added function_exists call to avoid duplicate function definitions for helper function #6153