prefer _.isEqual to .equals and some code gardening