raise error when summing 2 templates