creating a smart contract for managing elections