added sample code for pattern chain of responsibility