isEqual + bug tests

Added isEqual function