use sprintf instead of tables to do the ballot