Use multiple programs instead of ifs