parser written. still bugs are there.