add ref for js promise