fixed TD example
added comments