made modal template general purpose