structuring the code