refactoring the town genration and updating the code
adding new exception
finalizing the first algorithm with tests