added an equality operator to allow for testing conditions