removed assigning factory to variable