simplify the concept by introducing a pile object which contains a handler object;
Branch is a pile; extend Pile class to invoke the next pile based on the branch.