Implemented C version of vectorrally