switch to js