changing main-viz to support data retrieve onload