update js to test device functions