Use generator for paths instead