adding singleton js