updated to new treated logic