text formatting
kill threads properly