add chain of responsibility pattern codes