organised the code!!