structure the code