before change to js