changing template context initialisation to pass in pointer