Add template for sort