added functions to store vote