organaised a bit of the code