port to tnt 1.6: first try