generateLake function included.