My concern here was using `len("all") != 0`. Better to put the "all" condition first...