finished placeBids cpp func