Added handle_vote handler function