added random vector generator