lesson4: added strategy pattern