equals method

Tested, commented, and memory checked the == method.