started on click hanlding for templates