javascript wrapper works