add vote validation funtion