move world generation code to separate script