redone the populate_walls function