advanced functions final