change structure of storing labels
enclose parser in a closure