getting templates and button data working