store current path as js/Array