generating binary with struct module