Generic delegate example added
Code refactored