implemented parsing of flat structure