implementation of equal_. closes #19