removed dependency to factory