first version, recognizes levels of entries, that they don't overlap