added optional delegate for visual customization