impelement strategy pattern