Also, BTW, there's probably no reason to use ListBuffer over ArrayBuffer in this code