print to vector instead of console