An implementation of vector algebra in 3 dimensions