update js runtime to be generic