added template for reverse.