moved functions, changed factory