edited templates so comparison functions can work