adding the use of delegate