implement card compare