abstract the helper in template