update modal initialize process to fit other scripts