added gvector in pure js.