created a custom function to eliminate confusing inline template