more work on #221, javascript methods are needed for set handling