Made `max_chars` variable