use xhr instead of nets