still working on the general architecture of the code