Fix compare and add inspect method