added visualization func