tweak to avoid new in js