adding better vote function