Edited javascript