added functional voting