array vs linked - compareTo instead of equals