extracted voting and slugging logic to modules