changed the structure of the code. it should now be easier to reload changed