Make ta a function