Should this be do while, instead of if (count & 1)?