added compareAttributes