changed parsing, added levels