struct code into modules