working javascript version