fixed tab issue; added template variables