changed javascript on stretch