add simple factory example