implement pattern strategy