init JS object