adding replace helper for templates provisionally