testing vector on mac + improve coding style