this is a practice of delegate for ios