adding client-side templates support