template 4 generic comparison of structures implemented