Javascript modified