compare the d member for checking equality