new function added for vote