javascript emulation starting to actually work\!