TDA working, made into separate task