Edited Javascript