bug fixes, add more text parsing