Added isEquivalent and commute for testing

These are required for the course