refactor
add support for tau, untested