documenting & refactoring
added equal and identical functions