added toVector method
docs