fix VIP/sage function