add arraysEqual function, use in findComponentContaining