made JS protocal agnostic