crappy nesting parser