added traceback support to index, scalar code