some fixes to the parser

allocations still not working properly
debugging parser

other bug persevering