replacing ruby function with inline_template