Elections as instruments for punishing bad representatives and selecting good ones