trace fixed

but must be made more efficient, can be done along with getindex