refactored code, randomised planet locations