Using manual unique array algo instead of prototype