implement flowers generate algorithms