added template adaption for search