using template instead of direct echo