filtered out empty levels instead of removing them