attempt to improve parsing
more attempted memory management