factory example with modules