A strategy pattern is used.