added working javacript