add codes for chain of responsibility