we wait in gen_byte rather than in algo function, easier to write algo functions