edited javascript