added strategy pattern