implemented vote method