partially add multiple trace handling, need more change