fixed sketch for javascript