add support for multiple fragment blocks and comments