adding factory example