core: improve nested