better optimized the code for lab2 (no longer hard coded for parser) and began lab3