working locate.js example