TNNLS code refined