added eq and more test cases
added eq method