chain of responsibility implemented. TODO third DP, fix me and is sound