Replaced arraysEqual with underscore function