option factory implementation