adding code of 'Chain of Responsiblity' Pattern