a lot of code as attempts to generate a level :-(