edited vizloaded function