voting logic now working