update tempate and controller