implementing ajax template