implement delegate for example