improved lod handling
refactoring