added check for duplicated voting