randomly generate vector