updated voted method