updates vote table in database