- handle the '-t' option
- safer memory allocation
