make trimmed tags adjustable
reallocate memory when needed
only calculate body length once in readTag
fix return values in main