finished work on parser