chain of responsibility pattern.