improved parsing by making it parse using one object rather than two which was confusing