add template for equals.