making compare into compareAll internal method and creating a compare for rest calls