use template instead of inline html