still a bit of restructuring is left
re structuring the code