adding a test and making the js work.