hy, refractor with strategy pattern